<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=面向, initial-scale=1.0">
    <title>面向对象</title>
</head>

<body>

</body>

</html>
<script>
    let person = {
        nickname: "刘晓兰",
        age: 18,
        gender: 0,
        eat: function(food) {
            window.console.log('吃' + food);
        }
    };
    window.console.log(person);
    person.eat('人参');
</script>